<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@include file="/view/jsp/resource.jsp"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/view/jsp/css.jsp"%>
<link
	href="${ctx}/res/css/plugins/dataTables/dataTables.bootstrap.min.css"
	rel="stylesheet" />
<link
	href="${ctx}/res/css/plugins/dataTables/jquery.dataTables.min.css"
	rel="stylesheet" />
<link href="${ctx}/res/css/plugins/dropzone/dropzone.css"
	rel="stylesheet" />
	<link href="${ctx}/res/css/plugins/chosen/chosen.css"
	rel="stylesheet" />
<link
	href="${ctx}/res/css/plugins/ztree/zTreeStyle/zTreeStyle.css"
	rel="stylesheet" />
<link href="${ctx}/res/css/style.css?v=2.2.0" rel="stylesheet" />
<title>ash快速开发框架</title>
</head>
<body>
	<div id="wrapper">
		<%@include file="/view/jsp/menu.jsp"%>
		<div id="page-wrapper" class="yin-bg dashbard-1">
			<%@include file="/view/jsp/top.jsp"%>
			<!-- 面包屑导航开始 -->
			<div class="row wrapper border-bottom white-bg page-heading">
				<div class="col-lg-6">
					<h2>项目列表</h2>
					<ol class="breadcrumb">
						<li><a href="${ctx}">主页</a></li>
						<li><a>fang</a></li>
						<li><strong>项目列表</strong></li>
					</ol>
				</div>
				<div class="col-lg-6">
					<div class="btn-group headerbtn">
                                        <button class="btn btn-warning checkAll" type="button" ><i class='fa fa-check-square'></i>全选</button>
                                        <button class="btn btn-primary toggleCheck" type="button"><i class='fa fa-check-square-o'></i>反选</button>
                                        <button class="btn btn-info addBtn" type="button"><i class='fa fa-plus'></i>新增</button>
                                        <button class="btn btn-danger delBtn" type="button"><i class='fa fa-trash-o'></i>删除</button>
					</div>
				</div>
			</div>
			<div class="wrapper wrapper-content animated fadeIn ">
				  <div class="row editrow">
                    <div class="col-lg-8 col-lg-offset-2  ">
                        <div class="ibox box-shadow ">
                            <div class="ibox-title " >
                            <h2 style="width:90%;float:left" class="leader">新增项目</h2>
                                <div class="ibox-tools"  style="width:4%;float:right">
                                    <a class="collapse-link">
                                        <i class="fa fa-chevron-up"></i>
                                    </a>
                                    <a class="close-link">
		                                <i class="fa fa-times"></i>
		                            </a>
                                </div>
                            </div>
                            <div class="ibox-content ">
                                <form class="form-horizontal m-t validate" id="ProjectForm" action = "${ctx}/admin/fang/project/save" method="POST">
										<input type="hidden" name="id" id="id" class="form-control ">
								   	<div class="form-group">
										<label class="col-sm-3 control-label" for="name">名称</label>
										<div class="col-sm-8">
											<input type="text" name="name" id="name" class="form-control {required:true}">
											
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label">地区</label>
										<div class="col-sm-8">
											<div class="region"></div>
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-3 control-label">地理位置</label>
										<div class="col-sm-8">
											<label class="col-sm-1 control-label" for="jd">经度</label>
											<div class="col-sm-3"> 
												<input type="text" name="jd" id="jd" class="form-control"/>
											</div>
											<label class="col-sm-1 control-label" for="wd">纬度</label>
											<div class="col-sm-3"> 
												<input type="text" name="wd" id="wd" class="form-control "/>
											</div>
											<div class="col-sm-4"> 
											<span  class="default likebtn"  id="getpoint" >
												<i class="fa fa-map-marker"></i>&nbsp;&nbsp;获取地理坐标
											</span>
											</div>
										</div>
									</div>

									<div class="form-group">
										<div class="col-sm-12 ">
											<label class="col-sm-3 control-label" for="iscommend">是否推荐</label>
											<div class="col-sm-1">
												<input type="radio" name="iscommend"  value="1">是
												<input type="radio" name="iscommend"  value="0">否
											</div>
											<label class="col-sm-2 control-label" for="iskinghu">是否金牌户型</label>
											<div class="col-sm-1">
												<input type="radio" name="iskinghu"  value="1">是
												<input type="radio" name="iskinghu"  value="0">否
											</div>
											<label class="col-sm-1 control-label" for="sortnum">排序数</label>
											<div class="col-sm-3">
												<input type="text" name="sortnum" id="sortnum" class="form-control">

											</div>
										</div>
									</div>
								   						
								   	<div class="form-group">
										<label class="col-sm-3 control-label" for="tel">电话</label>
										<div class="col-sm-8">
											<input type="text" name="tel" id="tel" class="form-control ">
										</div>
									</div>
								   	
								   
								   	<div class="form-group">
										<label class="col-sm-3 control-label" for="address">地址</label>
										<div class="col-sm-8">
											<input type="text" name="address" id="address" class="form-control {required:true}">
										</div>
									</div>
									
								   	<div class="form-group">
										<label class="col-sm-3 control-label" for="maxarea">最大面积</label>
										<div class="col-sm-8">
											<input type="text" name="maxarea" id="maxarea" class="form-control {required:true}">
										</div>
									</div>
								   	<div class="form-group">
										<label class="col-sm-3 control-label" for="minarea">最小面积</label>
										<div class="col-sm-8">
											<input type="text" name="minarea" id="minarea" class="form-control {required:true}">
										</div>
									</div>
								   	<div class="form-group">
										<label class="col-sm-3 control-label" for="avgprice">平均价格</label>
										<div class="col-sm-8">
											<input type="text" name="avgprice" id="avgprice" class="form-control {required:true}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label" for="remark">说明</label>
										<div class="col-sm-8">
											<textarea  name="remark" id="remark" class="form-control"></textarea>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label" for="says">专家评说</label>
										<div class="col-sm-8">
											<textarea name="says" id="says" class="form-control"></textarea>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-3 control-label" for="pinpainame">品牌</label>
										<div class="col-sm-8">
											<input type="hidden" name="pinpaiid" id="pinpaiid" class="form-control ">
											<input type="text" name="pinpainame" id="pinpainame" class="form-control " >
										</div>
									</div>
								     <div class="form-group">
                                        <div class="col-sm-8 col-sm-offset-3">
                                            <button class="btn btn-primary" type="submit" >提 交</button>
                                            <button class="btn btn-primary resetAddForm" type="button">取 消</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
				<div class="row" style="height:40px;">
				</div>
			
				<div class="row">
					<div class="col-lg-12">
						<div class="ibox float-e-margins">
							<div class="ibox-content">
								<table
									class="table table-striped table-bordered table-hover projectDataTable">
									<thead>
										<tr>
											<th></th>
											<th >编号</th>
											<th >名称</th>
											<th >标志</th>
											<th >电话</th>
											<th >地址</th>
											<th >最大面积</th>
											<th >最小面积</th>
											<th >平均价格</th>
											<th></th>
										</tr>
									</thead>
									<tbody>
									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
				
			</div>
		</div>
	</div>

	<div id="pinpaiMenu" class="treemenu">
		<ul id="pinpaiTree" class="ztree " style="margin-top: 0;">
		</ul>
	</div>
	<%@include file="/view/jsp/js.jsp"%>
	<script src="${ctx}/res/js/json2.js"></script>
	<script src="${ctx}/res/js/plugins/dataTables/jquery.dataTables.min.js"></script>
	<script src="${ctx}/res/js/plugins/dataTables/dataTables.bootstrap.min.js"></script>
	<script src="${ctx}/res/js/plugins/validate/jquery.validate.min.js"></script>
	<script src="${ctx}/res/js/plugins/validate/messages_zh.min.js"></script>
	<script src="${ctx}/res/js/plugins/validate/validate_expand.js"></script>
	<script src="${ctx}/res/js/plugins/ztree/jquery.ztree.all-3.5.min.js"></script>
		<script src="${ctx}/res/js/plugins/chosen/chosen.jquery.js"></script>
	<script src="${ctx}/res/js/plugins/dropzone/dropzone.min.js"></script>
	<script src="${ctx}/res/js/plugins/dropzone/ash_dz.js"></script>
	<script src="${ctx}/res/js/plugins/region/region.js"></script>
	<script src="${ctx}/res/js/plugins/region/region.js"></script>
	<script src="http://api.map.baidu.com/api?v=1.5&ak=uQ60mEmU3s12er03ffEcQwuk" type="text/javascript"></script>
	<script src="${ctx}/res/js/platform/com/liuhung/ash/fang/project.js"></script>
	<script type="text/javascript">
	$(function(){
		$("#imgurl").ash_dz({deleteAble:false,maxfiles:1});
		$(".region").region();
		var $_name=$("#name");
		var $_shiid=$("#shiid");
		$("#getpoint").click(function(){
			var myGeo = new BMap.Geocoder();
			if($_name.val()==null||$_name.val()=="")
			{
				layer.msg("名称不能为空！");
				return;
			}
			if($_shiid.val()==null||$_shiid.val()=="")
			{
				layer.msg("城市不能为空！");
			}
			else
			{
				myGeo.getPoint($("#name").val(), function(point){
					if(point)
					{
						$("#jd").val(point.lng);
						$("#wd").val(point.lat);
					}
					else
						layer.msg("获取失败！"+$("#shiid").find("option:selected").text());
				}, $("#shiid").find("option:selected").text());
			}
		})
		
		
	});
	
	</script>
</body>

</html>
